# int, float, string, boolean, bytes, None
# list
l = [1, 1.1, 'abc', bool(1), bytes('abc'.encode("utf-8")), None]
print('l:', l)
# append
l.append('append')
print('l:', l)
# + & +=
l1 = ['l1']
l2 = l + l1
print('l2:', l2)
l += l1
print('l:', l)
# * & *=
a = 'a'
la = a * 10
print('la:', la)
# insert
l.insert(0, 'start')
print('l:', l)
# retrieve
print('l[1]:', l[1])
print('l[0:5]:', l[0:5])
l.insert(l.index('abc'), 'before')
print('l:', l)
# update
l[0] = 'start2'
print(l)
l[0: 2] = 'a'
print('l:', l)
# delete
x = l.pop()
print('x:', x)
print('l:', l)
l.clear()
print('l:', l)
# sort
l = [1, 4, 2, 6, 3]
l.sort()
print('l:', l)
l_1 = [1, 4, 2, 6, 3]
l_2 = sorted(l_1)
print('l_1:', l_1)
print('l_2:', l_2)
l.reverse()
print('l:', l)
print('\n')

# tuple
t = (2, 2.2, 'def', bool(0), bytes('def'.encode("utf-8")), None)
print('t:', t)
# retrieve
print('t[0]:', t[0])
print('t.index(2):', t.index(2))
print('t[0:2]', t[0:2])
print('\n')

# dict
d = {'a': 3, 'b': 3.3, 'c': 'hello', 'd': bool(3), 'e': bytes('hello'.encode("utf-8")), 'f': None}
print(d)
# update
d2 = {'g': 1, 'h': 2}
d.update(d2)
print('d2', d2)
print('d:', d)
x = d.setdefault('b', 0)
print('x:', x)
print('d:', d)
keys = list(d.keys())
print('keys:', keys)
values = d.values()
print('values:', values)
items = d.items()
print('items:', items)
# delete
a = d.pop('a')
print('a:', a)
print('d:', d)
d.clear()
print('d:', d)
print('\n')

# set
s = {4, 4.4, 'world', bool(4), bytes('world'.encode("utf-8")), None}
print('s:', s)
s.add('last')
print('s:', s)
b = 'a' in s
print('b:', b)
# delete
s.remove('world')
print('s:', s)